/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuPrincipal.java
 *

 */

/** Integrantes :
 * Rosbely Gonzalez
 * Jaily Leon
 * Mariant Barroeta
 * Maria Alejandra Leal 
 * 
 */

package general;

import vistas.vista_categorias;
import vistas.vista_ingredientes;
import vistas.vista_listado_ingredientes;
import vistas.vista_listado_productos;
import vistas.vista_ordenes;
import vistas.vista_producto;

public class MenuPrincipal extends javax.swing.JFrame {

    /** Creates new form MenuPrincipal */
    public MenuPrincipal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktopPane = new javax.swing.JDesktopPane();
        menuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        boton_ingrediente = new javax.swing.JMenuItem();
        editMenu = new javax.swing.JMenu();
        boton_categoria = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        boton_ordenes = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        fileMenu.setText("Ingrediente");

        boton_ingrediente.setText("Registrar");
        boton_ingrediente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boton_ingredienteActionPerformed(evt);
            }
        });
        fileMenu.add(boton_ingrediente);

        menuBar.add(fileMenu);

        editMenu.setText("Categoria");

        boton_categoria.setText("registrar");
        boton_categoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boton_categoriaActionPerformed(evt);
            }
        });
        editMenu.add(boton_categoria);

        menuBar.add(editMenu);

        helpMenu.setText("Producto");

        boton_ordenes.setText("Registrar");
        boton_ordenes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boton_ordenesActionPerformed(evt);
            }
        });
        helpMenu.add(boton_ordenes);

        menuBar.add(helpMenu);

        jMenu1.setText("Ordenes");

        jMenuItem1.setText("registrar");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        menuBar.add(jMenu1);

        jMenu2.setText("listados");

        jMenuItem2.setText("Ventas por productos");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem2);

        jMenuItem3.setText("cantidad Ingredientes");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem3);

        menuBar.add(jMenu2);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(desktopPane, javax.swing.GroupLayout.PREFERRED_SIZE, 536, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(desktopPane, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-562)/2, (screenSize.height-440)/2, 562, 440);
    }// </editor-fold>//GEN-END:initComponents

    private void boton_ingredienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boton_ingredienteActionPerformed
        // TODO add your handling code here:
        vista_ingredientes vi = new vista_ingredientes();
        vi.show();
    }//GEN-LAST:event_boton_ingredienteActionPerformed

    private void boton_categoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boton_categoriaActionPerformed
        // TODO add your handling code here:
        vista_categorias vc = new vista_categorias();
        vc.show();
    }//GEN-LAST:event_boton_categoriaActionPerformed

    private void boton_ordenesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boton_ordenesActionPerformed
        // TODO add your handling code here:
        vista_producto vp = new vista_producto();
        vp.show();
    }//GEN-LAST:event_boton_ordenesActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
          vista_ordenes vo = new vista_ordenes();
        vo.show();
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        vista_listado_productos vlp = new vista_listado_productos();
        vlp.show();

    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        vista_listado_ingredientes vli = new vista_listado_ingredientes();
        vli.show();
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MenuPrincipal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem boton_categoria;
    private javax.swing.JMenuItem boton_ingrediente;
    private javax.swing.JMenuItem boton_ordenes;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JMenu editMenu;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuBar menuBar;
    // End of variables declaration//GEN-END:variables

}
